.class public Lcom/xingbook/park/a/q;
.super Landroid/widget/BaseAdapter;


# instance fields
.field private a:Lcom/xingbook/park/a/r;

.field private b:Landroid/view/LayoutInflater;

.field private c:I

.field private d:[Lcn/a/a/c/a;

.field private e:I


# direct methods
.method public constructor <init>(Landroid/content/Context;I[Lcn/a/a/c/a;)V
    .locals 1

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    const/4 v0, 0x0

    iput v0, p0, Lcom/xingbook/park/a/q;->e:I

    iput p2, p0, Lcom/xingbook/park/a/q;->c:I

    iput-object p3, p0, Lcom/xingbook/park/a/q;->d:[Lcn/a/a/c/a;

    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    iput-object v0, p0, Lcom/xingbook/park/a/q;->b:Landroid/view/LayoutInflater;

    return-void
.end method


# virtual methods
.method public a(I)V
    .locals 0

    iput p1, p0, Lcom/xingbook/park/a/q;->e:I

    return-void
.end method

.method public getCount()I
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/a/q;->d:[Lcn/a/a/c/a;

    array-length v0, v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .locals 1

    iget-object v0, p0, Lcom/xingbook/park/a/q;->d:[Lcn/a/a/c/a;

    aget-object v0, v0, p1

    return-object v0
.end method

.method public getItemId(I)J
    .locals 2

    iget-object v0, p0, Lcom/xingbook/park/a/q;->d:[Lcn/a/a/c/a;

    aget-object v0, v0, p1

    invoke-virtual {v0}, Lcn/a/a/c/a;->k()I

    move-result v0

    int-to-long v0, v0

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 3

    if-nez p2, :cond_0

    new-instance v0, Lcom/xingbook/park/a/r;

    invoke-direct {v0, p0}, Lcom/xingbook/park/a/r;-><init>(Lcom/xingbook/park/a/q;)V

    iput-object v0, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    iget-object v0, p0, Lcom/xingbook/park/a/q;->b:Landroid/view/LayoutInflater;

    iget v1, p0, Lcom/xingbook/park/a/q;->c:I

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    iget-object v1, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    const v0, 0x7f0a006b

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, v1, Lcom/xingbook/park/a/r;->a:Landroid/widget/TextView;

    iget-object v1, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    const v0, 0x7f0a006c

    invoke-virtual {p2, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, v1, Lcom/xingbook/park/a/r;->b:Landroid/widget/ImageView;

    iget-object v0, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    invoke-virtual {p2, v0}, Landroid/view/View;->setTag(Ljava/lang/Object;)V

    :goto_0
    invoke-virtual {p0, p1}, Lcom/xingbook/park/a/q;->getItem(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcn/a/a/c/a;

    iget-object v1, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    iget-object v1, v1, Lcom/xingbook/park/a/r;->a:Landroid/widget/TextView;

    invoke-virtual {v0}, Lcn/a/a/c/a;->b()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget v0, p0, Lcom/xingbook/park/a/q;->e:I

    if-ne p1, v0, :cond_1

    iget-object v0, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    iget-object v0, v0, Lcom/xingbook/park/a/r;->a:Landroid/widget/TextView;

    const/16 v1, -0x100

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    iget-object v0, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    iget-object v0, v0, Lcom/xingbook/park/a/r;->b:Landroid/widget/ImageView;

    const/4 v1, 0x0

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    :goto_1
    return-object p2

    :cond_0
    invoke-virtual {p2}, Landroid/view/View;->getTag()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/xingbook/park/a/r;

    iput-object v0, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    goto :goto_0

    :cond_1
    iget-object v0, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    iget-object v0, v0, Lcom/xingbook/park/a/r;->a:Landroid/widget/TextView;

    const/4 v1, -0x1

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V

    iget-object v0, p0, Lcom/xingbook/park/a/q;->a:Lcom/xingbook/park/a/r;

    iget-object v0, v0, Lcom/xingbook/park/a/r;->b:Landroid/widget/ImageView;

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setVisibility(I)V

    goto :goto_1
.end method
